import { defineComponent, h } from '@vue/runtime-core'
import mapImg from '../../assets/images/map.jpg'
import { useMapScroll } from './useMapScroll'
export default defineComponent({
  setup(props, ctx) {
    const { mapY1, mapY2 } = useMapScroll()
    return {
      mapY1,
      mapY2
    }
  },
  render(ctx) {
    return h('Container', [
      h('Sprite', {texture: mapImg, y: ctx.mapY1 }),
      h('Sprite', {texture: mapImg, y: ctx.mapY2 })
    ])
  }
})